<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2018-10-23T06:18:10.521000000">
    <meta name="changed" content="2020-06-26T10:59:00.126200000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en">
    <title>
      Comparator
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="maindiv">
      <h1>
        <img class="iconlibs" src="../../../../icons/6464/comparator.png" alt="#########" width="32" height="32" align="middle"> <em>Comparator</em>
      </h1>
      <table>
        <tbody>
          <tr>
            <td>
              <strong>Library:</strong>
            </td>
            <td>
              <a href="index.html">Arithmetic</a>
            </td>
          </tr>
          <tr>
            <td>
              <strong>Introduced:</strong>
            </td>
            <td>
              2.0 Beta 22
            </td>
          </tr>
          <tr>
            <td valign="top">
              <strong>Appearance:</strong>
            </td>
            <td valign="top">
              <img class="appearancelibs" src="../../../../img-libs/comparator.png" alt="#########" width="64" height="64">
            </td>
          </tr>
        </tbody>
      </table>
      <h2>
        Behavior
      </h2>
      <p>
        Compares two values, either as unsigned values or as two's-complement values, depending on the Numeric Type attribute. Normally, one of the outputs will be 1, and the other two outputs will be 0.
      </p>
      <p>
        The comparison is performed starting at the most significant bits in each number and descending downward in parallel until a location is found where the two values disagree. If, however, an error value or a floating value is encountered during this descent, then all outputs will match that error or floating value.
      </p>
      <h2>
        Pins
      </h2>
      <dl>
        <dt>
          West edge, north end (input, bit width matches Data Bits attribute)
        </dt>
        <dd>
          The first of the two values to be compared.
        </dd>
        <dt>
          West edge, south end (input, bit width matches Data Bits attribute)
        </dt>
        <dd>
          The second of the two values to be compared.
        </dd>
        <dt>
          East edge, labeled <tt>&gt;</tt> (output, bit width 1)
        </dt>
        <dd>
          1 if the first input is greater than the second input, 0 if the first input is less than or equal the second input.
        </dd>
        <dt>
          East edge, labeled <tt>=</tt> (output, bit width 1)
        </dt>
        <dd>
          1 if the first input equals the second input, 0 if the first input is not equal the second input.
        </dd>
        <dt>
          East edge, labeled <tt>&lt;</tt> (output, bit width 1)
        </dt>
        <dd>
          1 if the first input is less than the second input, 0 if the first input is greater than or equal the second input.
        </dd>
      </dl>
      <h2>
        Attributes
      </h2>
      <p>
        When the component is selected or being added, <b class="tkeybd">Alt-0</b> throught <b class="tkeybd">Alt-9</b> alter its <b class="propertie">Data Bits</b> attribute.
      </p>
	  <div class="attliste">
      <dl>
        <dt>
          <b class="propertie">Data Bits</b>
        </dt>
        <dd>
          The bit width of the component's inputs.
        </dd>
      </dl>
	  </div>
      <h2>
        Poke Tool Behavior
      </h2>
      <p>
        None.
      </p>
      <h2>
        Text Tool Behavior
      </h2>
      <p>
        None.
      </p>
      <p>
         <b>Back to</b> <a href="../index.html">Library Reference</a>
      </p>
    </div>
  </body>
</html>
